<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>用户登录</title>
</head>
<body>
<h2>用户登录</h2>
<%
    // 显示错误信息（如果有）
    String error = request.getParameter("error");
    if ("1".equals(error)) {
%>
<p style="color:red;">用户名或密码错误，请重新输入！</p>
<%
    }
%>
<form action="validate.jsp" method="post">
    <table>
        <tr>
            <td>用户名：</td>
            <td><input type="text" name="username" required></td>
        </tr>
        <tr>
            <td>密码：</td>
            <td><input type="password" name="password" required></td>
        </tr>
        <tr>
            <td colspan="2" style="text-align:center;">
                <input type="submit" value="登录">
                <input type="reset" value="重置">
            </td>
        </tr>
    </table>
</form>
<p>测试账号：用户名：tom，密码：jenny</p>
</body>
</html>